package com.livedocumentation.client.web.menu;

import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.HTML;
import com.livedocumentation.client.model.Feature;
import com.livedocumentation.client.web.description.ListEntriesFiltered;

/**
 * 
 * @UserInterface
 */
public class FeaturesLink extends HTML {

	public static final String textUnpressed = "<a href='#'>Main Features</a>";
	public static final String textPressed = "<a href='#'><font color=orange><b>Main Features</b></font></a>";

	public FeaturesLink() {

		this.setHTML(textUnpressed);
		this.addClickHandler(new ClickHandler() {

			@Override
			public void onClick(ClickEvent event) {

				Menu.untoggleLinks();
				Menu.featuresListLink.setHTML(textPressed);

				new ListEntriesFiltered(Feature.FEATURE_TYPE);
			}
		});

	}
}